package presenter;

import com.example.drangh.MainActivity;

import bean.HomeBean;
import contract.HomeContract;
import model.HomeModel;

public class HomePresenter implements HomeContract.Presenter {
private HomeContract.View view;
private HomeModel homeModel;

    public HomePresenter(HomeContract.View view, HomeModel homeModel) {
        this.view = view;
        this.homeModel = homeModel;
    }

    public HomePresenter(MainActivity mainActivity) {

    }

    @Override
    public void getData() {
        homeModel.getData(new HomeContract.CallBack() {
            @Override
            public void getSuccess(HomeBean bean) {
                view.getSuccess(bean);
            }

            @Override
            public void getFile(String msg) {
            view.getFile(msg);
            }
        });
    }
}
